{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="float-right">
        <button type="submit" id="button-save" form="form-setting" data-toggle="tooltip" title="{{ button_save }}" disabled="disabled" class="btn btn-primary"><i class="fas fa-save"></i></button>
        <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-light"><i class="fas fa-reply"></i></a></div>
      <h1>{{ heading_title }}</h1>
      <ol class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
          <li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ol>
    </div>
  </div>
  <div class="container-fluid"> {% if error_warning %}
      <div class="alert alert-danger alert-dismissible"><i class="fas fa-exclamation-circle"></i> {{ error_warning }}
        <button type="button" class="close" data-dismiss="alert">&times;</button>
      </div>
    {% endif %}
    {% if success %}
      <div class="alert alert-success alert-dismissible"><i class="fas fa-check-circle"></i> {{ success }}
        <button type="button" class="close" data-dismiss="alert">&times;</button>
      </div>
    {% endif %}
    <div class="card">
      <div class="card-header"><i class="fas fa-pencil-alt"></i> {{ text_edit }}</div>
      <div class="card-body">
        <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-setting">
          <ul class="nav nav-tabs">
            <li class="nav-item"><a href="#tab-general" data-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
            <li class="nav-item"><a href="#tab-store" data-toggle="tab" class="nav-link">{{ tab_store }}</a></li>
            <li class="nav-item"><a href="#tab-local" data-toggle="tab" class="nav-link">{{ tab_local }}</a></li>
            <li class="nav-item"><a href="#tab-option" data-toggle="tab" class="nav-link">{{ tab_option }}</a></li>
            <li class="nav-item"><a href="#tab-image" data-toggle="tab" class="nav-link">{{ tab_image }}</a></li>
            <li class="nav-item"><a href="#tab-mail" data-toggle="tab" class="nav-link">{{ tab_mail }}</a></li>
            <li class="nav-item"><a href="#tab-server" data-toggle="tab" class="nav-link">{{ tab_server }}</a></li>
          </ul>
          <div class="tab-content">
            <div class="tab-pane active" id="tab-general">
              <div class="form-group row required">
                <label class="col-sm-2 col-form-label" for="input-meta-title">{{ entry_meta_title }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_meta_title" value="{{ config_meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title" class="form-control"/>
                  {% if error_meta_title %}
                    <div class="invalid-tooltip">{{ error_meta_title }}</div>
                  {% endif %}</div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-meta-description">{{ entry_meta_description }}</label>
                <div class="col-sm-10">
                  <textarea name="config_meta_description" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description" class="form-control">{{ config_meta_description }}</textarea>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-meta-keyword">{{ entry_meta_keyword }}</label>
                <div class="col-sm-10">
                  <textarea name="config_meta_keyword" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword" class="form-control">{{ config_meta_keyword }}</textarea>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-theme">{{ entry_theme }}</label>
                <div class="col-sm-10">
                  <select name="config_theme" id="input-theme" class="form-control">
                    {% for theme in themes %}
                      {% if theme.value == config_theme %}
                        <option value="{{ theme.value }}" selected="selected">{{ theme.text }}</option>
                      {% else %}
                        <option value="{{ theme.value }}">{{ theme.text }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                  <br/>
                  <img src="" alt="" id="theme" class="img-thumbnail"/></div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-layout">{{ entry_layout }}</label>
                <div class="col-sm-10">
                  <select name="config_layout_id" id="input-layout" class="form-control">
                    {% for layout in layouts %}
                      {% if layout.layout_id == config_layout_id %}
                        <option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
                      {% else %}
                        <option value="{{ layout.layout_id }}">{{ layout.name }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
            </div>
            <div class="tab-pane" id="tab-store">
              <div class="form-group row required">
                <label class="col-sm-2 col-form-label" for="input-name">{{ entry_name }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_name" value="{{ config_name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control"/>
                  {% if error_name %}
                    <div class="invalid-tooltip">{{ error_name }}</div>
                  {% endif %}</div>
              </div>
              <div class="form-group row required">
                <label class="col-sm-2 col-form-label" for="input-owner">{{ entry_owner }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_owner" value="{{ config_owner }}" placeholder="{{ entry_owner }}" id="input-owner" class="form-control"/>
                  {% if error_owner %}
                    <div class="invalid-tooltip">{{ error_owner }}</div>
                  {% endif %}</div>
              </div>
              <div class="form-group row required">
                <label class="col-sm-2 col-form-label" for="input-address">{{ entry_address }}</label>
                <div class="col-sm-10">
                  <textarea name="config_address" placeholder="{{ entry_address }}" rows="5" id="input-address" class="form-control">{{ config_address }}</textarea>
                  {% if error_address %}
                    <div class="invalid-tooltip">{{ error_address }}</div>
                  {% endif %}</div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-geocode">{{ entry_geocode }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_geocode" value="{{ config_geocode }}" placeholder="{{ entry_geocode }}" id="input-geocode" class="form-control"/>
                  <small class="form-text text-muted">{{ help_geocode }}</small>
                </div>
              </div>
              <div class="form-group row required">
                <label class="col-sm-2 col-form-label" for="input-email">{{ entry_email }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_email" value="{{ config_email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control"/>
                  {% if error_email %}
                    <div class="invalid-tooltip">{{ error_email }}</div>
                  {% endif %}</div>
              </div>
              <div class="form-group row required">
                <label class="col-sm-2 col-form-label" for="input-telephone">{{ entry_telephone }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_telephone" value="{{ config_telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control"/>
                  {% if error_telephone %}
                    <div class="invalid-tooltip">{{ error_telephone }}</div>
                  {% endif %}</div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-fax">{{ entry_fax }}</label>
                <div class="col-sm-10">
                  <input type="text" name="config_fax" value="{{ config_fax }}" placeholder="{{ entry_fax }}" id="input-fax" class="form-control"/>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-image">{{ entry_image }}</label>
                <div class="col-sm-10">
                  <div class="card image">
                    <img src="{{ thumb }}" alt="" title="" id="thumb-image" data-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="config_image" value="{{ config_image }}" id="input-image"/>
                    <div class="card-body">
                      <button type="button" data-toggle="image" data-target="#input-image" data-thumb="#thumb-image" class="btn btn-primary btn-sm btn-block"><i class="fas fa-pencil-alt"></i> {{ button_edit }}</button>
                      <button type="button" data-toggle="clear" data-target="#input-image" data-thumb="#thumb-image" class="btn btn-warning btn-sm btn-block"><i class="fas fa-trash-alt"></i> {{ button_clear }}</button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-open">{{ entry_open }}</label>
                <div class="col-sm-10">
                  <textarea name="config_open" rows="5" placeholder="{{ entry_open }}" id="input-open" class="form-control">{{ config_open }}</textarea>
                  <small class="form-text text-muted">{{ help_open }}</small>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-comment">{{ entry_comment }}</label>
                <div class="col-sm-10">
                  <textarea name="config_comment" rows="5" placeholder="{{ entry_comment }}" id="input-comment" class="form-control">{{ config_comment }}</textarea>
                  <small class="form-text text-muted">{{ help_comment }}</small>
                </div>
              </div>
              {% if locations %}
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_location }}</label>
                  <div class="col-sm-10">
                    <div class="form-control" style="height: 150px; overflow: auto;">
                      {% for location in locations %}
                        <label class="form-check">
                          {% if location.location_id in config_location %}
                            <input type="checkbox" name="config_location[]" value="{{ location.location_id }}" checked="checked" class="form-check-input"/>
                            {{ location.name }}
                          {% else %}
                            <input type="checkbox" name="config_location[]" value="{{ location.location_id }}" class="form-check-input"/>
                            {{ location.name }}
                          {% endif %}
                        </label>
                      {% endfor %}
                    </div>
                    <small class="form-text text-muted">{{ help_location }}</small>
                  </div>
                </div>
              {% endif %}
            </div>
            <div class="tab-pane" id="tab-local">
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-country">{{ entry_country }}</label>
                <div class="col-sm-10">
                  <select name="config_country_id" id="input-country" class="form-control">
                    {% for country in countries %}
                      {% if country.country_id == config_country_id %}
                        <option value="{{ country.country_id }}" selected="selected">{{ country.name }}</option>
                      {% else %}
                        <option value="{{ country.country_id }}">{{ country.name }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-zone">{{ entry_zone }}</label>
                <div class="col-sm-10">
                  <select name="config_zone_id" id="input-zone" class="form-control"> </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-timezone">{{ entry_timezone }}</label>
                <div class="col-sm-10">
                  <select name="config_timezone" id="input-timezone" class="form-control">
                    {% for timezone in timezones %}
                      {% if timezone.value == config_timezone %}
                        <option value="{{ timezone.value }}" selected="selected">{{ timezone.text }}</option>
                      {% else %}
                        <option value="{{ timezone.value }}">{{ timezone.text }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-language">{{ entry_language }}</label>
                <div class="col-sm-10">
                  <select name="config_language" id="input-language" class="form-control">
                    {% for language in languages %}
                      {% if language.code == config_language %}
                        <option value="{{ language.code }}" selected="selected">{{ language.name }}</option>
                      {% else %}
                        <option value="{{ language.code }}">{{ language.name }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-admin-language">{{ entry_admin_language }}</label>
                <div class="col-sm-10">
                  <select name="config_admin_language" id="input-admin-language" class="form-control">
                    {% for language in languages %}
                      {% if language.code == config_admin_language %}
                        <option value="{{ language.code }}" selected="selected">{{ language.name }}</option>
                      {% else %}
                        <option value="{{ language.code }}">{{ language.name }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-currency">{{ entry_currency }}</label>
                <div class="col-sm-10">
                  <select name="config_currency" id="input-currency" class="form-control">
                    {% for currency in currencies %}
                      {% if currency.code == config_currency %}
                        <option value="{{ currency.code }}" selected="selected">{{ currency.title }}</option>
                      {% else %}
                        <option value="{{ currency.code }}">{{ currency.title }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                  <small class="form-text text-muted">{{ help_currency }}</small>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-currency-engine">{{ entry_currency_engine }}</label>
                <div class="col-sm-10">
                  <select name="config_currency_engine" id="input-currency-engine" class="form-control">
                    {% for currency_engine in currency_engines %}
                      {% if currency_engine.value == config_currency_engine %}
                        <option value="{{ currency_engine.value }}" selected="selected">{{ currency_engine.text }}</option>
                      {% else %}
                        <option value="{{ currency_engine.value }}">{{ currency_engine.text }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label">{{ entry_currency_auto }}</label>
                <div class="col-sm-10">
                  <div class="btn-group btn-group-toggle" data-toggle="buttons">
                    {% if config_currency_auto %}
                      <label class="btn btn-outline-secondary active"><input type="radio" name="config_currency_auto" value="1" checked="checked"/> {{ text_yes }}</label>
                      <label class="btn btn-outline-secondary"><input type="radio" name="config_currency_auto" value="0"/> {{ text_no }}</label>
                    {% else %}
                      <label class="btn btn-outline-secondary"><input type="radio" name="config_currency_auto" value="1"/> {{ text_yes }}</label>
                      <label class="btn btn-outline-secondary active"><input type="radio" name="config_currency_auto" value="0" checked="checked"/> {{ text_no }}</label>
                    {% endif %}
                  </div>
                  <small class="form-text text-muted">{{ help_currency_auto }}</small>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-length-class">{{ entry_length_class }}</label>
                <div class="col-sm-10">
                  <select name="config_length_class_id" id="input-length-class" class="form-control">
                    {% for length_class in length_classes %}
                      {% if length_class.length_class_id == config_length_class_id %}
                        <option value="{{ length_class.length_class_id }}" selected="selected">{{ length_class.title }}</option>
                      {% else %}
                        <option value="{{ length_class.length_class_id }}">{{ length_class.title }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-weight-class">{{ entry_weight_class }}</label>
                <div class="col-sm-10">
                  <select name="config_weight_class_id" id="input-weight-class" class="form-control">
                    {% for weight_class in weight_classes %}
                      {% if weight_class.weight_class_id == config_weight_class_id %}
                        <option value="{{ weight_class.weight_class_id }}" selected="selected">{{ weight_class.title }}</option>
                      {% else %}
                        <option value="{{ weight_class.weight_class_id }}">{{ weight_class.title }}</option>
                      {% endif %}
                    {% endfor %}
                  </select>
                </div>
              </div>
            </div>
            <div class="tab-pane" id="tab-option">
              <ul class="nav nav-tabs">
                <li class="nav-item"><a href="#tab-product" data-toggle="tab" class="nav-link active">{{ tab_product }}</a></li>
                <li class="nav-item"><a href="#tab-review" data-toggle="tab" class="nav-link">{{ tab_review }}</a></li>
                <li class="nav-item"><a href="#tab-voucher" data-toggle="tab" class="nav-link">{{ tab_voucher }}</a></li>
                <li class="nav-item"><a href="#tab-legal" data-toggle="tab" class="nav-link">{{ tab_legal }}</a></li>
                <li class="nav-item"><a href="#tab-tax" data-toggle="tab" class="nav-link">{{ tab_tax }}</a></li>
                <li class="nav-item"><a href="#tab-account" data-toggle="tab" class="nav-link">{{ tab_account }}</a></li>
                <li class="nav-item"><a href="#tab-checkout" data-toggle="tab" class="nav-link">{{ tab_checkout }}</a></li>
                <li class="nav-item"><a href="#tab-stock" data-toggle="tab" class="nav-link">{{ tab_stock }}</a></li>
                <li class="nav-item"><a href="#tab-affiliate" data-toggle="tab" class="nav-link">{{ tab_affiliate }}</a></li>
                <li class="nav-item"><a href="#tab-return" data-toggle="tab" class="nav-link">{{ tab_return }}</a></li>
                <li class="nav-item"><a href="#tab-captcha" data-toggle="tab" class="nav-link">{{ tab_captcha }}</a></li>
              </ul>
              <div class="tab-content">
                <div class="tab-pane active" id="tab-product">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_product_count }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_product_count %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_product_count" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_product_count" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_product_count" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_product_count" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_product_count }}</small>
                    </div>
                  </div>
                  <div class="form-group row required">
                    <label class="col-sm-2 col-form-label" for="input-admin-limit">{{ entry_limit_admin }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_limit_admin" value="{{ config_limit_admin }}" placeholder="{{ entry_limit_admin }}" id="input-admin-limit" class="form-control"/>
                      <small class="form-text text-muted">{{ help_limit_admin }}</small>
                      {% if error_limit_admin %}
                        <div class="invalid-tooltip">{{ error_limit_admin }}</div>
                      {% endif %}</div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-review">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_review_status }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_review_status %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_review_status" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_review_status" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_review_status" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_review_status" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_review }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_review_guest }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_review_guest %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_review_guest" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_review_guest" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_review_guest" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_review_guest" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_review_guest }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-voucher">
                  <div class="form-group row required">
                    <label class="col-sm-2 col-form-label" for="input-voucher-min">{{ entry_voucher_min }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_voucher_min" value="{{ config_voucher_min }}" placeholder="{{ entry_voucher_min }}" id="input-voucher-min" class="form-control"/>
                      <small class="form-text text-muted">{{ help_voucher_min }}</small>
                      {% if error_voucher_min %}
                        <div class="invalid-tooltip">{{ error_voucher_min }}</div>
                      {% endif %}</div>
                  </div>
                  <div class="form-group row required">
                    <label class="col-sm-2 col-form-label" for="input-voucher-max">{{ entry_voucher_max }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_voucher_max" value="{{ config_voucher_max }}" placeholder="{{ entry_voucher_max }}" id="input-voucher-max" class="form-control"/>
                      <small class="form-text text-muted">{{ help_voucher_max }}</small>
                      {% if error_voucher_max %}
                        <div class="invalid-tooltip">{{ error_voucher_max }}</div>
                      {% endif %}</div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-legal">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-cookie">{{ entry_cookie }}</label>
                    <div class="col-sm-10">
                      <select name="config_cookie_id" id="input-cookie" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for information in informations %}
                          {% if information.information_id == config_cookie_id %}
                            <option value="{{ information.information_id }}" selected="selected">{{ information.title }}</option>
                          {% else %}
                            <option value="{{ information.information_id }}">{{ information.title }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_cookie }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-gdpr">{{ entry_gdpr }}</label>
                    <div class="col-sm-10">
                      <select name="config_gdpr_id" id="input-gdpr" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for information in informations %}
                          {% if information.information_id == config_gdpr_id %}
                            <option value="{{ information.information_id }}" selected="selected">{{ information.title }}</option>
                          {% else %}
                            <option value="{{ information.information_id }}">{{ information.title }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_gdpr }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-gdpr-limit">{{ entry_gdpr_limit }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_gdpr_limit" value="{{ config_gdpr_limit }}" placeholder="{{ entry_gdpr_limit }}" id="input-gdpr-limit" class="form-control"/>
                      <small class="form-text text-muted">{{ help_gdpr_limit }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-tax">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_tax }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_tax %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_tax" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_tax" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_tax" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_tax" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-tax-default">{{ entry_tax_default }}</label>
                    <div class="col-sm-10">
                      <select name="config_tax_default" id="input-tax-default" class="form-control">
                        <option value="">{{ text_none }}</option>
                        {% if config_tax_default == 'shipping' %}
                          <option value="shipping" selected="selected">{{ text_shipping }}</option>
                        {% else %}
                          <option value="shipping">{{ text_shipping }}</option>
                        {% endif %}
                        {% if config_tax_default == 'payment' %}
                          <option value="payment" selected="selected">{{ text_payment }}</option>
                        {% else %}
                          <option value="payment">{{ text_payment }}</option>
                        {% endif %}
                      </select>
                      <small class="form-text text-muted">{{ help_tax_default }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-tax-customer">{{ entry_tax_customer }}</label>
                    <div class="col-sm-10">
                      <select name="config_tax_customer" id="input-tax-customer" class="form-control">
                        <option value="">{{ text_none }}</option>
                        {% if config_tax_customer == 'shipping' %}
                          <option value="shipping" selected="selected">{{ text_shipping }}</option>
                        {% else %}
                          <option value="shipping">{{ text_shipping }}</option>
                        {% endif %}
                        {% if config_tax_customer == 'payment' %}
                          <option value="payment" selected="selected">{{ text_payment }}</option>
                        {% else %}
                          <option value="payment">{{ text_payment }}</option>
                        {% endif %}
                      </select>
                      <small class="form-text text-muted">{{ help_tax_customer }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-account">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_customer_online }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_customer_online %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_online" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_online" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_online" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_online" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_customer_online }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_customer_activity }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_customer_activity %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_activity" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_activity" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_activity" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_activity" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_customer_activity }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_customer_search }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_customer_search %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_search" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_search" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_search" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_search" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-customer-group">{{ entry_customer_group }}</label>
                    <div class="col-sm-10">
                      <select name="config_customer_group_id" id="input-customer-group" class="form-control">
                        {% for customer_group in customer_groups %}
                          {% if customer_group.customer_group_id == config_customer_group_id %}
                            <option value="{{ customer_group.customer_group_id }}" selected="selected">{{ customer_group.name }}</option>
                          {% else %}
                            <option value="{{ customer_group.customer_group_id }}">{{ customer_group.name }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_customer_group }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_customer_group_display }}</label>
                    <div class="col-sm-10">
                      <div class="form-control" style="height: 150px; overflow: auto;">
                        {% for customer_group in customer_groups %}
                          <label class="form-check">{% if customer_group.customer_group_id in config_customer_group_display %}
                              <input type="checkbox" name="config_customer_group_display[]" value="{{ customer_group.customer_group_id }}" checked="checked" class="form-check-input"/>
                              {{ customer_group.name }}
                            {% else %}
                              <input type="checkbox" name="config_customer_group_display[]" value="{{ customer_group.customer_group_id }}" class="form-check-input"/>
                              {{ customer_group.name }}
                            {% endif %}</label>
                        {% endfor %}
                      </div>
                      <small class="form-text text-muted">{{ help_customer_group_display }}</small>
                      {% if error_customer_group_display %}
                        <div class="invalid-tooltip">{{ error_customer_group_display }}</div>
                      {% endif %}</div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_customer_price }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_customer_price %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_price" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_price" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_customer_price" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_customer_price" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_customer_price }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-login-attempts">{{ entry_login_attempts }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_login_attempts" value="{{ config_login_attempts }}" placeholder="{{ entry_login_attempts }}" id="input-login-attempts" class="form-control"/>
                      <small class="form-text text-muted">{{ help_login_attempts }}</small>
                      {% if error_login_attempts %}
                        <div class="invalid-tooltip">{{ error_login_attempts }}</div>
                      {% endif %}</div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-account">{{ entry_account }}</label>
                    <div class="col-sm-10">
                      <select name="config_account_id" id="input-account" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for information in informations %}
                          {% if information.information_id == config_account_id %}
                            <option value="{{ information.information_id }}" selected="selected">{{ information.title }}</option>
                          {% else %}
                            <option value="{{ information.information_id }}">{{ information.title }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_account }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-checkout">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-invoice-prefix">{{ entry_invoice_prefix }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_invoice_prefix" value="{{ config_invoice_prefix }}" placeholder="{{ entry_invoice_prefix }}" id="input-invoice-prefix" class="form-control"/>
                      <small class="form-text text-muted">{{ help_invoice_prefix }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_cart_weight }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_cart_weight %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_cart_weight" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_cart_weight" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_cart_weight" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_cart_weight" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_cart_weight }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_checkout_guest }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_checkout_guest %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_checkout_guest" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_checkout_guest" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_checkout_guest" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_checkout_guest" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_checkout_guest }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-checkout">{{ entry_checkout }}</label>
                    <div class="col-sm-10">
                      <select name="config_checkout_id" id="input-checkout" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for information in informations %}
                          {% if information.information_id == config_checkout_id %}
                            <option value="{{ information.information_id }}" selected="selected">{{ information.title }}</option>
                          {% else %}
                            <option value="{{ information.information_id }}">{{ information.title }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_checkout }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-order-status">{{ entry_order_status }}</label>
                    <div class="col-sm-10">
                      <select name="config_order_status_id" id="input-order-status" class="form-control">
                        {% for order_status in order_statuses %}
                          {% if order_status.order_status_id == config_order_status_id %}
                            <option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
                          {% else %}
                            <option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_order_status }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-process-status">{{ entry_processing_status }}</label>
                    <div class="col-sm-10">
                      <div class="form-control" style="height: 150px; overflow: auto;">
                        {% for order_status in order_statuses %}
                          <label class="form-check">{% if order_status.order_status_id in config_processing_status %}
                              <input type="checkbox" name="config_processing_status[]" value="{{ order_status.order_status_id }}" checked="checked" class="form-check-input"/>
                              {{ order_status.name }}
                            {% else %}
                              <input type="checkbox" name="config_processing_status[]" value="{{ order_status.order_status_id }}" class="form-check-input"/>
                              {{ order_status.name }}
                            {% endif %}
                          </label>
                        {% endfor %}
                      </div>
                      <small class="form-text text-muted">{{ help_processing_status }}</small>
                      {% if error_processing_status %}
                        <div class="invalid-tooltip">{{ error_processing_status }}</div>
                      {% endif %}
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-complete-status">{{ entry_complete_status }}</label>
                    <div class="col-sm-10">
                      <div class="form-control" style="height: 150px; overflow: auto;">
                        {% for order_status in order_statuses %}
                          <label class="form-check">
                            {% if order_status.order_status_id in config_complete_status %}
                              <input type="checkbox" name="config_complete_status[]" value="{{ order_status.order_status_id }}" checked="checked" class="form-check-input"/>
                              {{ order_status.name }}
                            {% else %}
                              <input type="checkbox" name="config_complete_status[]" value="{{ order_status.order_status_id }}" class="form-check-input"/>
                              {{ order_status.name }}
                            {% endif %}
                          </label>
                        {% endfor %}
                      </div>
                      <small class="form-text text-muted">{{ help_complete_status }}</small>
                      {% if error_complete_status %}
                        <div class="invalid-tooltip">{{ error_complete_status }}</div>
                      {% endif %}</div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-fraud-status">{{ entry_fraud_status }}</label>
                    <div class="col-sm-10">
                      <select name="config_fraud_status_id" id="input-fraud-status" class="form-control">
                        {% for order_status in order_statuses %}
                          {% if order_status.order_status_id == config_fraud_status_id %}
                            <option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
                          {% else %}
                            <option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_fraud_status }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-api">{{ entry_api }}</label>
                    <div class="col-sm-10">
                      <select name="config_api_id" id="input-api" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for api in apis %}
                          {% if api.api_id == config_api_id %}
                            <option value="{{ api.api_id }}" selected="selected">{{ api.username }}</option>
                          {% else %}
                            <option value="{{ api.api_id }}">{{ api.username }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_api }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-stock">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_stock_display }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_stock_display %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_stock_display" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_stock_display" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_stock_display" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_stock_display" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_stock_display }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_stock_warning }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_stock_warning %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_stock_warning" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_stock_warning" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_stock_warning" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_stock_warning" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_stock_warning }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_stock_checkout }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_stock_checkout %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_stock_checkout" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_stock_checkout" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_stock_checkout" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_stock_checkout" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_stock_checkout }}</small>
                    </div>
                  </div>

                </div>
                <div class="tab-pane" id="tab-affiliate">

                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-affiliate-group">{{ entry_affiliate_group }}</label>
                    <div class="col-sm-10">
                      <select name="config_affiliate_group_id" id="input-affiliate-group" class="form-control">
                        {% for customer_group in customer_groups %}
                          {% if customer_group.customer_group_id == config_affiliate_group_id %}
                            <option value="{{ customer_group.customer_group_id }}" selected="selected">{{ customer_group.name }}</option>
                          {% else %}
                            <option value="{{ customer_group.customer_group_id }}">{{ customer_group.name }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_affiliate_approval }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_affiliate_approval %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_affiliate_approval" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_affiliate_approval" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_affiliate_approval" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_affiliate_approval" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_affiliate_approval }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_affiliate_auto }}</label>
                    <div class="col-sm-10">
                      <div class="btn-group btn-group-toggle" data-toggle="buttons">
                        {% if config_affiliate_auto %}
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_affiliate_auto" value="1" checked="checked"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_affiliate_auto" value="0"/> {{ text_no }}</label>
                        {% else %}
                          <label class="btn btn-outline-secondary"><input type="radio" name="config_affiliate_auto" value="1"/> {{ text_yes }}</label>
                          <label class="btn btn-outline-secondary active"><input type="radio" name="config_affiliate_auto" value="0" checked="checked"/> {{ text_no }}</label>
                        {% endif %}
                      </div>
                      <small class="form-text text-muted">{{ help_affiliate_auto }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-affiliate-commission">{{ entry_affiliate_commission }}</label>
                    <div class="col-sm-10">
                      <input type="text" name="config_affiliate_commission" value="{{ config_affiliate_commission }}" placeholder="{{ entry_affiliate_commission }}" id="input-affiliate-commission" class="form-control"/>
                      <small class="form-text text-muted">{{ help_affiliate_commission }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-affiliate">{{ entry_affiliate }}</label>
                    <div class="col-sm-10">
                      <select name="config_affiliate_id" id="input-affiliate" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for information in informations %}
                          {% if information.information_id == config_affiliate_id %}
                            <option value="{{ information.information_id }}" selected="selected">{{ information.title }}</option>
                          {% else %}
                            <option value="{{ information.information_id }}">{{ information.title }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_affiliate }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-return">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-return">{{ entry_return }}</label>
                    <div class="col-sm-10">
                      <select name="config_return_id" id="input-return" class="form-control">
                        <option value="0">{{ text_none }}</option>
                        {% for information in informations %}
                          {% if information.information_id == config_return_id %}
                            <option value="{{ information.information_id }}" selected="selected">{{ information.title }}</option>
                          {% else %}
                            <option value="{{ information.information_id }}">{{ information.title }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_return }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-return-status">{{ entry_return_status }}</label>
                    <div class="col-sm-10">
                      <select name="config_return_status_id" id="input-return-status" class="form-control">
                        {% for return_status in return_statuses %}
                          {% if return_status.return_status_id == config_return_status_id %}
                            <option value="{{ return_status.return_status_id }}" selected="selected">{{ return_status.name }}</option>
                          {% else %}
                            <option value="{{ return_status.return_status_id }}">{{ return_status.name }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_return_status }}</small>
                    </div>
                  </div>
                </div>
                <div class="tab-pane" id="tab-captcha">
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label" for="input-captcha">{{ entry_captcha }}</label>
                    <div class="col-sm-10">
                      <select name="config_captcha" id="input-captcha" class="form-control">
                        <option value="">{{ text_none }}</option>
                        {% for captcha in captchas %}
                          {% if captcha.value == config_captcha %}
                            <option value="{{ captcha.value }}" selected="selected">{{ captcha.text }}</option>
                          {% else %}
                            <option value="{{ captcha.value }}">{{ captcha.text }}</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                      <small class="form-text text-muted">{{ help_captcha }}</small>
                    </div>
                  </div>
                  <div class="form-group row">
                    <label class="col-sm-2 col-form-label">{{ entry_captcha_page }}</label>
                    <div class="col-sm-10">
                      <div class="form-control" style="height: 150px; overflow: auto;">
                        {% for captcha_page in captcha_pages %}
                          <label class="form-check">
                            {% if captcha_page.value in config_captcha_page %}
                              <input type="checkbox" name="config_captcha_page[]" value="{{ captcha_page.value }}" checked="checked" class="form-check-input"/>
                              {{ captcha_page.text }}
                            {% else %}
                              <input type="checkbox" name="config_captcha_page[]" value="{{ captcha_page.value }}" class="form-check-input"/>
                              {{ captcha_page.text }}
                            {% endif %}
                          </label>
                        {% endfor %}
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="tab-pane" id="tab-image">
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-logo">{{ entry_logo }}</label>
                <div class="col-sm-10">
                  <div class="card image">
                    <img src="{{ logo }}" alt="" title="" id="thumb-logo" data-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="config_logo" value="{{ config_logo }}" id="input-logo"/>
                    <div class="card-body">
                      <button type="button" data-toggle="image" data-target="#input-logo" data-thumb="#thumb-logo" class="btn btn-primary btn-sm btn-block"><i class="fas fa-pencil-alt"></i> {{ button_edit }}</button>
                      <button type="button" data-toggle="clear" data-target="#input-logo" data-thumb="#thumb-logo" class="btn btn-warning btn-sm btn-block"><i class="fas fa-trash-alt"></i> {{ button_clear }}</button>
                    </div>
                  </div>
                </div>
              </div>
              <div class="form-group row">
                <label class="col-sm-2 col-form-label" for="input-icon">{{ entry_icon }}</label>
                <div class="col-sm-10">
                  <div class="card image">
                    <img src="{{ icon }}" alt="" title="" id="thumb-icon" data-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="config_icon" value="{{ config_icon }}" id="input-icon"/>
                    <div class="card-body">
                      <button type="button" data-toggle="image" data-target="#input-icon" data-thumb="#thumb-icon" class="btn btn-primary btn-sm btn-block"><i class="fas fa-pencil-alt"></i> {{ button_edit }}</button>
                      <button type="button" data-toggle="clear" data-target="#input-icon" data-thumb="#thumb-icon" class="btn btn-warning btn-sm btn-block"><i class="fas fa-trash-alt"></i> {{ button_clear }}</button>
                    </div>
                  </div>
                  <small class="form-text text-muted">{{ help_icon }}</small>
                </div>
              </div>
            </div>
            <div class="tab-pane" id="tab-mail">
              <fieldset>
                <legend>{{ text_general }}</legend>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-engine">{{ entry_mail_engine }}</label>
                  <div class="col-sm-10">
                    <select name="config_mail_engine" id="input-mail-engine" class="form-control">
                      {% if config_mail_engine == 'mail' %}
                        <option value="mail" selected="selected">{{ text_mail }}</option>
                      {% else %}
                        <option value="mail">{{ text_mail }}</option>
                      {% endif %}
                      {% if config_mail_engine == 'smtp' %}
                        <option value="smtp" selected="selected">{{ text_smtp }}</option>
                      {% else %}
                        <option value="smtp">{{ text_smtp }}</option>
                      {% endif %}
                    </select>
                    <small class="form-text text-muted">{{ help_mail_engine }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-parameter">{{ entry_mail_parameter }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_mail_parameter" value="{{ config_mail_parameter }}" placeholder="{{ entry_mail_parameter }}" id="input-mail-parameter" class="form-control"/>
                    <small class="form-text text-muted">{{ help_mail_parameter }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-smtp-hostname">{{ entry_mail_smtp_hostname }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_mail_smtp_hostname" value="{{ config_mail_smtp_hostname }}" placeholder="{{ entry_mail_smtp_hostname }}" id="input-mail-smtp-hostname" class="form-control"/>
                    <small class="form-text text-muted">{{ help_mail_smtp_hostname }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-smtp-username">{{ entry_mail_smtp_username }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_mail_smtp_username" value="{{ config_mail_smtp_username }}" placeholder="{{ entry_mail_smtp_username }}" id="input-mail-smtp-username" class="form-control"/>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-smtp-password">{{ entry_mail_smtp_password }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_mail_smtp_password" value="{{ config_mail_smtp_password }}" placeholder="{{ entry_mail_smtp_password }}" id="input-mail-smtp-password" class="form-control"/>
                    <small class="form-text text-muted">{{ help_mail_smtp_password }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-smtp-port">{{ entry_mail_smtp_port }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_mail_smtp_port" value="{{ config_mail_smtp_port }}" placeholder="{{ entry_mail_smtp_port }}" id="input-mail-smtp-port" class="form-control"/>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-smtp-timeout">{{ entry_mail_smtp_timeout }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_mail_smtp_timeout" value="{{ config_mail_smtp_timeout }}" placeholder="{{ entry_mail_smtp_timeout }}" id="input-mail-smtp-timeout" class="form-control"/>
                  </div>
                </div>
              </fieldset>
              <fieldset>
                <legend>{{ text_mail_alert }}</legend>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_mail_alert }}</label>
                  <div class="col-sm-10">
                    <div class="form-control" style="height: 150px; overflow: auto;">
                      {% for mail_alert in mail_alerts %}
                        <label class="form-check">
                          {% if mail_alert.value in config_mail_alert %}
                            <input type="checkbox" name="config_mail_alert[]" value="{{ mail_alert.value }}" checked="checked" class="form-check-input"/>
                            {{ mail_alert.text }}
                          {% else %}
                            <input type="checkbox" name="config_mail_alert[]" value="{{ mail_alert.value }}" class="form-check-input"/>
                            {{ mail_alert.text }}
                          {% endif %}
                        </label>
                      {% endfor %}
                    </div>
                    <small class="form-text text-muted">{{ help_mail_alert }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-mail-alert-email">{{ entry_mail_alert_email }}</label>
                  <div class="col-sm-10">
                    <textarea name="config_mail_alert_email" rows="5" placeholder="{{ entry_mail_alert_email }}" id="input-alert-email" class="form-control">{{ config_mail_alert_email }}</textarea>
                    <small class="form-text text-muted">{{ help_mail_alert_email }}</small>
                  </div>
                </div>
              </fieldset>
            </div>
            <div class="tab-pane" id="tab-server">
              <fieldset>
                <legend>{{ text_general }}</legend>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_maintenance }}</label>
                  <div class="col-sm-10">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                      {% if config_maintenance %}
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_maintenance" value="1" checked="checked"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_maintenance" value="0"/> {{ text_no }}</label>
                      {% else %}
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_maintenance" value="1"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_maintenance" value="0" checked="checked"/> {{ text_no }}</label>
                      {% endif %}
                    </div>
                    <small class="form-text text-muted">{{ help_maintenance }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_seo_url }}</label>
                  <div class="col-sm-10">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                      {% if config_seo_url %}
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_seo_url" value="1" checked="checked"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_seo_url" value="0"/> {{ text_no }}</label>
                      {% else %}
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_seo_url" value="1"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_seo_url" value="0" checked="checked"/> {{ text_no }}</label>
                      {% endif %}
                    </div>
                    <small class="form-text text-muted">{{ help_seo_url }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-robots">{{ entry_robots }}</label>
                  <div class="col-sm-10">
                    <textarea name="config_robots" rows="5" placeholder="{{ entry_robots }}" id="input-robots" class="form-control">{{ config_robots }}</textarea>
                    <small class="form-text text-muted">{{ help_robots }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-compression">{{ entry_compression }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_compression" value="{{ config_compression }}" placeholder="{{ entry_compression }}" id="input-compression" class="form-control"/>
                    <small class="form-text text-muted">{{ help_compression }}</small>
                  </div>
                </div>
              </fieldset>
              <fieldset>
                <legend>{{ text_security }}</legend>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_password }}</label>
                  <div class="col-sm-10">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                      {% if config_password %}
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_password" value="1" checked="checked"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_password" value="0"/> {{ text_no }}</label>
                      {% else %}
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_password" value="1"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_password" value="0" checked="checked"/> {{ text_no }}</label>
                      {% endif %}
                    </div>
                    <small class="form-text text-muted">{{ help_password }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_shared }}</label>
                  <div class="col-sm-10">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                      {% if config_shared %}
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_shared" value="1" checked="checked"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_shared" value="0"/> {{ text_no }}</label>
                      {% else %}
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_shared" value="1"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_shared" value="0" checked="checked"/> {{ text_no }}</label>
                      {% endif %}
                    </div>
                    <small class="form-text text-muted">{{ help_shared }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-encryption">{{ entry_encryption }}</label>
                  <div class="col-sm-10">
                    <textarea name="config_encryption" rows="5" placeholder="{{ entry_encryption }}" id="input-encryption" class="form-control">{{ config_encryption }}</textarea>
                    <small class="form-text text-muted">{{ help_encryption }}</small>
                    {% if error_encryption %}
                      <div class="invalid-tooltip">{{ error_encryption }}</div>
                    {% endif %}</div>
                </div>
              </fieldset>
              <fieldset>
                <legend>{{ text_upload }}</legend>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-file-max-size">{{ entry_file_max_size }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_file_max_size" value="{{ config_file_max_size }}" placeholder="{{ entry_file_max_size }}" id="input-file-max-size" class="form-control"/>
                    <small class="form-text text-muted">{{ help_file_max_size }}</small>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-file-ext-allowed">{{ entry_file_ext_allowed }}</label>
                  <div class="col-sm-10">
                    <textarea name="config_file_ext_allowed" rows="5" placeholder="{{ entry_file_ext_allowed }}" id="input-file-ext-allowed" class="form-control">{{ config_file_ext_allowed }}</textarea>
                    <small class="form-text text-muted">{{ help_file_ext_allowed }}</small>
                    {% if error_extension %}
                      <div class="invalid-tooltip">{{ error_extension }}</div>
                    {% endif %}
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label" for="input-file-mime-allowed">{{ entry_file_mime_allowed }}</label>
                  <div class="col-sm-10">
                    <textarea name="config_file_mime_allowed" rows="5" placeholder="{{ entry_file_mime_allowed }}" id="input-file-mime-allowed" class="form-control">{{ config_file_mime_allowed }}</textarea>
                    <small class="form-text text-muted">{{ help_file_mime_allowed }}</small>
                    {% if error_mime %}
                      <div class="invalid-tooltip">{{ error_mime }}</div>
                    {% endif %}
                  </div>
                </div>
              </fieldset>
              <fieldset>
                <legend>{{ text_error }}</legend>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_error_display }}</label>
                  <div class="col-sm-10">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                      {% if config_error_display %}
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_error_display" value="1" checked="checked"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_error_display" value="0"/> {{ text_no }}</label>
                      {% else %}
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_error_display" value="1"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_error_display" value="0" checked="checked"/> {{ text_no }}</label>
                      {% endif %}
                    </div>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-sm-2 col-form-label">{{ entry_error_log }}</label>
                  <div class="col-sm-10">
                    <div class="btn-group btn-group-toggle" data-toggle="buttons">
                      {% if config_error_log %}
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_error_log" value="1" checked="checked"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_error_log" value="0"/> {{ text_no }}</label>
                      {% else %}
                        <label class="btn btn-outline-secondary"><input type="radio" name="config_error_log" value="1"/> {{ text_yes }}</label>
                        <label class="btn btn-outline-secondary active"><input type="radio" name="config_error_log" value="0" checked="checked"/> {{ text_no }}</label>
                      {% endif %}
                    </div>
                  </div>
                </div>
                <div class="form-group row required">
                  <label class="col-sm-2 col-form-label" for="input-error-filename">{{ entry_error_filename }}</label>
                  <div class="col-sm-10">
                    <input type="text" name="config_error_filename" value="{{ config_error_filename }}" placeholder="{{ entry_error_filename }}" id="input-error-filename" class="form-control"/>
                    {% if error_log %}
                      <div class="invalid-tooltip">{{ error_log }}</div>
                    {% endif %}</div>
                </div>
              </fieldset>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript"><!--
$('select[name=\'config_theme\']').on('change', function() {
	$.ajax({
		url: 'index.php?route=setting/setting/theme&user_token={{ user_token }}&theme=' + this.value,
		dataType: 'html',
		beforeSend: function() {
			$('select[name=\'config_theme\']').prop('disabled', true);
		},
		complete: function() {
			$('select[name=\'config_theme\']').prop('disabled', false);
		},
		success: function(html) {
			$('#theme').attr('src', html);
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('select[name=\'config_theme\']').trigger('change');
//--></script>
<script type="text/javascript"><!--
$('select[name=\'config_country_id\']').on('change', function() {
	$.ajax({
		url: 'index.php?route=localisation/country/country&user_token={{ user_token }}&country_id=' + this.value,
		dataType: 'json',
		beforeSend: function() {
			$('select[name=\'config_country_id\']').prop('disabled', true);
		},
		complete: function() {
			$('select[name=\'config_country_id\']').prop('disabled', false);
		},
		success: function(json) {
			html = '<option value="">{{ text_select }}</option>';

			if (json['zone'] && json['zone'] != '') {
				for (i = 0; i < json['zone'].length; i++) {
					html += '<option value="' + json['zone'][i]['zone_id'] + '"';

					if (json['zone'][i]['zone_id'] == '{{ config_zone_id }}') {
						html += ' selected="selected"';
					}

					html += '>' + json['zone'][i]['name'] + '</option>';
				}
			} else {
				html += '<option value="0" selected="selected">{{ text_none }}</option>';
			}

			$('select[name=\'config_zone_id\']').html(html);

			$('#button-save').prop('disabled', false);
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('select[name=\'config_country_id\']').trigger('change');
//--></script>
{{ footer }}
